import * as actionTypes from './constants';
import { getQuestionMessage } from '../../services';

const changeQuestionMessage = (res) => ({
    type:actionTypes.CHANGE_QUESTION_MESSAGE,
    questionMessage: res.data
})

export const getQuestionMessageAction = () => {
    return dispatch => {
        getQuestionMessage().then(res => {
            // console.log(res);
            dispatch(changeQuestionMessage(res));
        })
    }
}